home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 37 / Mac Magazin and MacEasy Magazine CD - Issue 37.iso / Software / Grafik / Web-Publishing / BBEdit HTML Tools v1.3 / Documentation / Setting up your root.txt < prev    next >
Text File  |  1995-01-17  |  3KB  |  59 lines

  1. Setting up your preferences.
  2.  
  3. Every Web server has a root, the top-most directory that can be accessed
  4. by the web server. It is important to set this root in your preferences,
  5. so that the addressing functions will generate the correct URLs for you.
  6.  
  7. Now, how you determine where your root is depends very much on where
  8. your Web server is, what platform it runs on, and how it is set up.
  9.  
  10. I work with two Web servers, one running MacHTTP on an old Mac
  11. IIsi, and the other being CERN httpd running on a Unix machine.
  12.  
  13. Before I go any further, it is important to stress that it is A BAD THING
  14. to edit 'live' documents. This can cause untold problems to anyone
  15. actually accessing your server at the time, so try to avoid it if you
  16. can.
  17.  
  18. My approach is to have a mirror of the Web area on my local hard disk.
  19. This allows me to do all the editing and testing offline. I can then copy
  20. the whole structure over to the Mac (and the Unix machine) in one
  21. operation (I would put in a hearty recommendation for the Synchronize
  22. application for this job - it is certainly invaluable to my work). The
  23. othe advantage is that you have a backup of your Web.
  24.  
  25. Focusing on the Unix system for a moment, there are a few things that
  26. you need to bear in mind. Firstly is that the case of you text is
  27. significant, so if you have made links to local files, then make sure
  28. that the case of the path and file name is exactly as it is on the
  29. server, otherwise you will be wondering why you keep getting errors.
  30. Secondly, if you intend to run any scripts over you web on the Unix
  31. machine, remember that unless you explicitly save your html documents
  32. in a unix format, then all lines will end with the standard Mac
  33. carriage return only, rather than CR/LF pairs.
  34.  
  35. OK, now the way that the system is set up here in York is that I can
  36. mount my account on the Unix machine on my Mac as though it was another
  37. Mac volume. I can't access any areas higher up the Unix directory in
  38. this way. This means that there is a 'gap' between the unix web server
  39. root and the files in my account. This gap is usually plugged on a Unix
  40. machine by the '~userID' shortcut, which takes you directly to the
  41. account of the userID specified (the tilde means go to the home
  42. directory of the userID). In my case that is '~ld11'. So in order to
  43. generate valid URLs, I need to be able to specify the URL to the root
  44. of the web server (eg http://www.york.ac.uk/), and in addition, the
  45. prefix that I need in order to get any of the files in my local area to
  46. be accessed.
  47.  
  48. So in my settings, I would set the server URL to be
  49. 'http://www.york.ac.uk', and the server prefix would be '~ld11'.
  50.  
  51. For those of you who don't have to jump through these sorts of hoops, you
  52. don't need to fill anything into the server prefix field.
  53.  
  54. Now all you have to do is set the root on you local machine to the
  55. top folder of the mirror that you have created and you have set it all
  56. up!
  57.  
  58. On a related note, I would suggest strongly that you take advantage of the BASE directive for your Web pages. The BASE HREF is used by the tools in some circumstances, and is always useful for people browsing your pages. Enter the HREF for your document in the BASE field of the Document tool.
  59.